var o;
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.PhoneType = undefined;
(function (e) {
  e[e.Low = 0] = "Low";
  e[e.Middle = 1] = "Middle";
  e[e.High = 2] = "High";
})(o = exports.PhoneType || (exports.PhoneType = {}));
var def_PhoneManager = /* */function () {
  function _ctor() {
    babel_classCallCheck(this, _ctor);
    this.whitelist = [1036, 1037, 1038, 1045, 1046, 1058, 1079, 1084, 1095, 1089, 1067, 1144, 1010];
    this.searchlist = [1017, 1005, 1006, 1027, 1106];
    this.chatlist = [];
    this.phonemodel = "";
    this.phoneleve = o.High;
    this.launch = 0;
    this.userleve = 0;
  }
  return babel_createClass(_ctor, null, [{
    key: "getInstance",
    value: function getInstance() {
      if (null == this.instance && (this.instance = new _ctor(), window.wx && wx.getSystemInfoSync)) {
        var _e31 = wx.getSystemInfoSync();
        this.instance.phonemodel = _e31.model;
        if (cc.sys.os == cc.sys.OS_IOS) {
          var _t32 = _e31.model;
          "iPhone 4" != _t32 && "iPhone 5" != _t32 && "iPhone 6" != _t32 || (this.instance.phoneleve = o.Low);
        } else {
          var _t33 = _e31.system;
          _t33 = _t33.split(" ")[1];
          if (_t33) {
            _t33 = parseFloat(_t33);
          }
          console.log(_t33, Math.max(_e31.windowHeight, _e31.windowWidth) * _e31.pixelRatio);
          (_t33 <= 8 || Math.max(_e31.windowHeight, _e31.windowWidth) * _e31.pixelRatio <= 1560) && (this.instance.phoneleve = o.Low);
        }
        var _t34 = "低端机";
        if (this.instance.phoneleve == o.Middle) {
          _t34 = "中端机";
        } else {
          this.instance.phoneleve == o.High && (_t34 = "高端机");
        }
        this.instance.launch = wx.m_launch;
        if (-1 != this.instance.whitelist.indexOf(this.instance.launch)) {
          this.instance.userleve = 0;
        } else if (-1 != this.instance.searchlist.indexOf(this.instance.launch)) {
          this.instance.userleve = 1;
        } else if (-1 != this.instance.chatlist.indexOf(this.instance.launch)) {
          this.instance.userleve = 0;
        } else {
          this.instance.userleve = 2;
        }
        var _n33 = cc.sys.localStorage.getItem("is_firstgame");
        null !== _n33 && "" !== _n33 || cc.sys.localStorage.setItem("is_firstgame", "is_firstgame");
      }
      return this.instance;
    }
  }]);
}();
exports.default = def_PhoneManager;
def_PhoneManager.instance = null;